// 查询企业的部门列表
import request from '@/utils/request'
export function department() {
  return request({
    url: '/company/department'
  })
}
// 删除部门接口
export function deldepartments(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}
// 新增部门功能
export function adddepartments(data) {
  return request({
    url: `/company/department`,
    method: 'POST',
    data
  })
}
// 根据ID查询部门详情
export function departmentById(id) {
  return request({
    url: `/company/department/${id}`
  })
}
// 根据ID修改部门详情

export function editdepartment(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
